package com.ch.dubbodemo.business.controller;

import com.alibaba.dubbo.config.annotation.Reference;
import com.ch.dubbodemo.api.HelloService;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping(value = "/")
public class HelloController {
    @Reference(version = "1.0.0")
    private HelloService helloService;
    @RequestMapping
    public ResponseEntity hello(@RequestParam String say){
        return ResponseEntity.ok(helloService.sayHello(say));
    }
}
